package com.gzgy.ustore.api.web.controller.webservice;

import com.gzgy.ustore.api.service.RoleService;
import com.gzgy.ustore.api.util.ResultUtil;
import com.gzgy.ustore.api.web.controller.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
public class RoleController extends BaseController{

    @Autowired
    private RoleService roleService;

    @RequestMapping(value = "roleList",method = RequestMethod.POST)
    public String roleList(ModelMap modelMap, String userId, String session){

        modelMap.put("message", ResultUtil.getResultJson(roleService.getRoleList()));

        return SHOW_JSON_NAME;
    }
}
